home *** CD-ROM | disk | FTP | other *** search
/ The Hacker Chronicles - A…the Computer Underground / The Hacker Chronicles - A Tour of the Computer Underground (P-80 Systems).iso / miscpub2 / uxu-080.txt < prev    next >
Text File  |  1992-09-26  |  41KB  |  978 lines

  1.  
  2. <><><><><><><><><><><><><><><><><><><>!<><><><><><><><><><><><><><><><><><><><>
  3. #%       ..uXu..                                                   1992      %#
  4. %#                       Underground eXperts United                          #%
  5. #%                                presents...                                %#
  6. %#                                  -=*=-                                    #%
  7. #%                 The European Digest Series Vol.2 Issue #3                 %#
  8. %#        1992                  By THE CHIEF                      ..uXu..    #%
  9. <><><><><><><><><><><><><><><><><><><>!<><><><><><><><><><><><><><><><><><><><>
  10.  
  11.      SPECIAL MANUAL ISSUE    -   SCO XENIX System V TUTORIAL CHAPTER #4 PT.2
  12.  
  13.                                   Contents...
  14.  
  15.                           01.............Introduction
  16.                           02.............Contents In Chapter Four (part 2)
  17.                           03.............Xenix Tutorial Chapter Four (part 2)
  18.                           04.............Recommended
  19.                           05.............End Comments
  20.  
  21.  
  22.  
  23.  
  24.  1. INTRODUCTION
  25.  ---------------
  26.  Welcome to TED Vol.2 Issue #3 - The uXu File #80!
  27.  This is Chapter 4 of the XENIX Tutorial series, Part 2, which concludes
  28.  chapter 4, and we're only two chapters from covering the complete manual.
  29.  Alongside with this series, we're covering Digital's VMS version 5, but
  30.  we will NOT publish the complete manual-package, only those sections we
  31.  get requests about, so if you don't request it, we will not publish it,
  32.  and you can take that to the bank. Enjoy.
  33.  
  34.  
  35.  
  36.  2. CONTENTS IN CHAPTER FOUR (part 2)
  37.  ------------------------------------
  38.  
  39.  CHAPTER 4 (part 2)
  40.  
  41.  Working With Files and Directories
  42.  _________________________________________________________________________
  43.  
  44.  
  45.  SCO XENIX System V TUTORIAL
  46.  
  47.  
  48.    4.4 Printing Files
  49.  
  50.        4.4.1 Using lp           [covered in the previous part]
  51.        4.4.2 Using lp Options
  52.        4.4.3 Cancelling a Print Request
  53.        4.4.4 Finding Out the Status of a Print Request
  54.  
  55.    4.5 Working With Files
  56.  
  57.        4.5.1 Displaying File Contents
  58.        4.5.2 Deleting Files
  59.        4.5.3 Combining Files
  60.        4.5.4 Renaming Files
  61.        4.5.5 Moving Files
  62.        4.5.6 Copying Files
  63.        4.5.7 Finding Files
  64.  
  65.    4.6 Processing Text Files
  66.  
  67.        4.6.1 Comparing Files
  68.        4.6.2 Sorting Files
  69.        4.6.3 Searching for Patterns in a File
  70.        4.6.4 Counting Words, Lines and Characters
  71.  
  72.    4.7 Using File and Directory Permissions
  73.  
  74.        4.7.1 Changing File Permissions
  75.        4.7.2 Changing Directory Permissions
  76.  
  77.  
  78.  
  79.  3. XENIX TUTORIAL CHAPTER FOUR
  80.  ------------------------------
  81.  
  82. _______________________________________________________________________________
  83.  
  84. 4.4.2                          USING LP OPTIONS                           4.4.2
  85. _______________________________________________________________________________
  86.  
  87.    The <lp> command has several options that help you control the printed
  88. output. You can specify the number of copies you want printed by using the
  89. number option, <-n>. For example, to print two copies of [printfile], enter:
  90.  
  91.                             <lp printfile -n2>
  92.  
  93.    Several different printers are often attached to a single XENIX system.
  94. With the <-d> option, you can specify the printer on which your file is to
  95. be printed. To print two copies of [printfile] on a printer named [laser],
  96. enter:
  97.  
  98.                          <lp printfile -n2 -dlaser>
  99.  
  100.    Check with your system administrator for the names of the printers
  101. available on your system.
  102.  
  103.  
  104. _______________________________________________________________________________
  105.  
  106. 4.4.3                       CANCELLING A PRINT REQUEST                    4.4.3
  107. _______________________________________________________________________________
  108.  
  109.    Use the <cancel> command to cancel a print request. The <cancel> command
  110. takes as its argument the request ID. For example, to stop printing a file
  111. with a request ID of [laser-245], you would enter:
  112.  
  113.                             <cancel laser-245>
  114.  
  115.    Experiment with <cancel> by using <lp> to print [printfile] and then
  116. using <cancel> to cancel the print request. When you are finished, enter the
  117. following command to remove [printfile]:
  118.  
  119.                                <rm printfile>
  120.  
  121.    You can also use the <cancel> command to stop whatever is currently
  122. printing on a particular printer. For example, to cancel whatever file is
  123. currently printing on the printer [laser], you would enter the following
  124. command:
  125.  
  126.                                <cancel laser>
  127.  
  128.    If you cancel a file that does not belong to you, mail reporting that the
  129. print request was canceled is automatically sent to the file's owner.
  130.  
  131.  
  132. _______________________________________________________________________________
  133.  
  134. 4.4.4             FINDING OUT THE STATUS OF A PRINT REQUEST               4.4.4
  135. _______________________________________________________________________________
  136.  
  137.    Use the <lpstat> command to check on the status of your print request.
  138. To use it, simply enter the following:
  139.  
  140.                                     <lpstat>
  141.  
  142.    The <lpstat> command produces output like the following:
  143.  
  144.                   --------------------------------------------
  145.                   prt1-121      cindym     450   Dec 15  09:30
  146.                   laser-450     cindym    4968   Dec 15  09:46
  147.                   --------------------------------------------
  148.  
  149.    Note that entering <lpstat> with no options displays information on your
  150. files only, not those of other users. To generate a report for all users on
  151. your computer, use <lpstat> with the <-o> option. Nothing is displayed by the
  152. <lpstat> command if the print job is complete.
  153.  
  154.    The first column of the <lpstat> output shows the request ID for each of
  155. your files being printed. The second column is your login name. In the third
  156. column, the number of characters to be printed is shown, and the fourth
  157. column lists the dates and times the print requests were made.
  158.  
  159.    To learn the status of a particular file, use the <lpstat> command with the
  160. file's request ID. For example, to find out the status of a file with the
  161. request ID of [laser-256], you would enter the follwing command:
  162.  
  163.                                <lpstat laser-256>
  164.  
  165.    The status of that file only is displayed.
  166.  
  167.    You can also request the status of various printers on your system by
  168. using the <-p> option or by giving the name of the particular printer you
  169. are interested in. Enter the following command to find out the status of all
  170. the printers on your system:
  171.  
  172.                                   <lpstat -p>
  173.  
  174.    To find out the status of a printer named [laser], you would enter the
  175. following:
  176.  
  177.                                 <lpstat -plaser>
  178.  
  179.    The request ID and status information for each file currently waiting
  180. to be printed on [laser] is displayed.
  181.  
  182.  
  183. _______________________________________________________________________________
  184.  
  185. 4.5                            WORKING WITH FILES                           4.5
  186. _______________________________________________________________________________
  187.  
  188.    File manipulation (creating, deleting, displaying, combining, renaming,
  189. moving, and copying) is one of the most important capabilities an operating
  190. system provides. The XENIX commands that perform these functions are described
  191. in the following sections.
  192.  
  193.  
  194. _______________________________________________________________________________
  195.  
  196. 4.5.1                       DISPLAYING FILE CONTENTS                      4.5.1
  197. _______________________________________________________________________________
  198.  
  199.    The <more> command displays the contents of a file, one screenful at a
  200. time. It cannot be used to edit files. If the file contains more than one
  201. screenful of data, you see the following prompt after each screen of text
  202. is displayed:
  203.  
  204.                                 --More--(XX%)
  205.  
  206.    XX% represents the percentage of the file displayed. Press the RETURN
  207. key to display another line. Press the SPACEBAR to display another screen.
  208.  
  209.    Try the follwing command:
  210.  
  211.                                <more /etc/rc>
  212.  
  213.    This causes the contents of [/etc/rc] to display on the screen. To quit
  214. <more> before [/etc/rc] is finished displaying, press [q] for quit.
  215.  
  216.    The <more> command does not allow you to scroll backward, towards the
  217. beginning of the file. However, you can search forward for patterns with
  218. <more> by using the slash (/) command. For example, enter the following
  219. commands to search for a line containing "process" in [/etc/rc]:
  220.  
  221.                                 <more /etc/rc>
  222.                                 </process>
  223.  
  224.    You see the following message at the top of the screen:
  225.  
  226.                       --------------------------------
  227.                       ...skipping
  228.                       --------------------------------
  229.  
  230.    If the pattern is found, it is displayed two lines below this message.
  231. If the pattern is not found, "Pattern not found" is displayed.
  232.  
  233.    If you are looking at a file with <more> and decide that you want to
  234. edit the file, you can invoke the <vi> editor by pressing [v]. Of course,
  235. you must have write permission on a file before you can edit it with <vi>
  236. or any other text editor. To display the file's contents, you only need
  237. read permission.
  238.  
  239.    You will often use <more> in pipes. For example, <more> is useful when
  240. you want to list the contents of a directory in long format. Enter the
  241. following command to display a long listing of the contents of [/bin], one
  242. screenful at a time:
  243.  
  244.                              <l /bin | more>
  245.  
  246.    (For more information on pipes, refer to Chapter 2 of this tutorial)
  247.  
  248.    The <head> and <tail> commands, display the beginning and the end of
  249. a file, respectively. With no options, they display the first or last 10
  250. lines. Enter the following command to display the last 10 lines of [/etc/rc]:
  251.  
  252.                               <tail /etc/rc>
  253.  
  254.    You can specify exactly how many lines you want displayed. Enter the
  255. following command to display the first 20 lines of [/etc/rc]:
  256.  
  257.                              <head -20 /etc/rc>
  258.  
  259.    Enter the following command to display the last 20 lines of [/etc/rc]:
  260.  
  261.                              <tail -20 /etc/rc>
  262.  
  263.    The <cat> command also displays the contents of a file. Unlike <more>,
  264. <cat> continuously scrolls the file until you stop the scroll with CTRL-S.
  265. CTRL-Q continues scrolling. Scrolling stops automatically when the end of
  266. the file is reached. To stop scrolling before the end of the file, press
  267. INTERRUPT, which is the DEL key on most keyboards.
  268.  
  269.    Enter the following command to display the contents of [/etc/termcap].
  270. Use CTRL-S and CTRL-Q to stop and start the scrolling and INTERRUPT to halt
  271. the scrolling before the end of the file is reached:
  272.  
  273.                               <cat /etc/termcap>
  274.  
  275. _______________________________________________________________________________
  276.  
  277. 4.5.2                           DELETING FILES                            4.5.2
  278. _______________________________________________________________________________
  279.  
  280.    The <rm> command is used to delete files. We have used it throughout this
  281. chapter to delete various files. Use <cd> to change to your home directory
  282. and enter the following command to create three new files:
  283.  
  284.                    <touch tempfile1 tempfile2 tempfile3>
  285.  
  286.    Delete [tempfile3] by entering the following command:
  287.  
  288.                                  <rm tempfile3>
  289.  
  290.    The <-i> option allows you to remove files interactively by asking you
  291. if you really want to delete each of the files specified on the command
  292. line. If you press [y] followed by a RETURN, the given file is removed.
  293. If you press [n], the file is left untouched. This option is useful when
  294. removing files from a directory that contains many files. It helps you
  295. avoid erasing files accidentally that you really want to keep.
  296.  
  297.    Experiment with the <-i> option by entering the following command:
  298.  
  299.                          <rm -i tempfile1 tempfile2>
  300.  
  301.    Note that you can place several filenames on the <rm> command line. This
  302. is true for most XENIX commands. You can also use wildcard characters. For
  303. example, instead of entering the above command, you could enter the
  304. following:
  305.  
  306.                              <rm -i tempfile*>
  307.  
  308.    (The use of wildcard characters on the XENIX command line is discussed
  309. in Chapter 2 of this tutorial.)
  310.  
  311.  
  312. _______________________________________________________________________________
  313.  
  314. 4.5.3                           COMBINING FILES                           4.5.3
  315. _______________________________________________________________________________
  316.  
  317.    In addition to displaying files, the <cat> command can be used to combine
  318. several existing files into a single new file. This is done by redirecting
  319. the output of <cat> into a new file. The greater-than sign (>) is used for
  320. redirection. If the new file does not exist, it is created automatically.
  321. (If you are not familiar with redirection, see Chapter 2 of this tutorial.)
  322.  
  323.    Use <cd> to move to your home directory and enter the following command
  324. to combine [/etc/motd] and [/etc/rc] into a file named [catfile]:
  325.  
  326.                      <cat /etc/motd /etc/rc > catfile>
  327.  
  328.    Now display the contents of the new file [catfile] with the <more>
  329. command:
  330.  
  331.                               <more catfile>
  332.  
  333.    The symbol >> can be used with <cat> to append one file to the end of
  334. another file. For example, to append the contents of [/etc/motd] to [catfile],
  335. enter the following command:
  336.  
  337.                          <cat /etc/motd >> catfile>
  338.  
  339.    The contents of [/etc/motd] should now be placed at the beginning and
  340. at the end of [catfile]. Verify this with the following <head> and <tail>
  341. commands:
  342.  
  343.                              <head -20 catfile>
  344.                              <tail -20 catfile>
  345.  
  346.  
  347. _______________________________________________________________________________
  348.  
  349. 4.5.4                           RENAMING FILES                            4.5.4
  350. _______________________________________________________________________________
  351.  
  352.    The <mv> command is used to move files around the XENIX filesystem and
  353. also to rename files. Use <cd> to move to your home directory. Rename
  354. [catfile], created in section 4.5.3, to [catfile2], by entering the following
  355. command:
  356.  
  357.                               <mv catfile catfile2>
  358.  
  359.    After this move is completed, [catfile] no longer exists. The file
  360. [catfile2] exists in its place. Verify this by entering the following
  361. command:
  362.  
  363.                                      <lc>
  364.  
  365.  
  366. _______________________________________________________________________________
  367.  
  368. 4.5.5                            MOVING FILES                             4.5.5
  369. _______________________________________________________________________________
  370.  
  371.    To move a file into another directory, give the name of the destination
  372. directory as the final name on the <mv> command. You do not need to specify
  373. the destination filename. For example, enter the following command to move
  374. [catfile2], created in section 4.5.4, to the [/tmp] directory:
  375.  
  376.                            <mv $HOME/catfile2 /tmp>
  377.  
  378.    To be sure that [catfile2] is in [/tmp] and not in the current directory,
  379. enter the following command:
  380.  
  381.                                   <lc . /tmp>
  382.  
  383.    (Remember that you can enter more than one argument on most XENIX
  384. command lines, and that the dot (.) stands for the current directory.)
  385.  
  386.    Finally, move [catfile2] back to the current directory by entering the
  387. following command:
  388.  
  389.                              <mv /tmp/catfile2 .>
  390.  
  391.    The <mv> command always checks to see if the last argument is the name
  392. of a directory. If it is, all files designated by filename arguments are
  393. moved into that directory. However, if you do not have write permission on
  394. the directory to which you are attempting to move files, the move fails.
  395.  
  396.  
  397. _______________________________________________________________________________
  398.  
  399. 4.5.6                            COPYING FILES                            4.5.6
  400. _______________________________________________________________________________
  401.  
  402.    The <cp> command is used to copy files. There are two forms of the <cp>
  403. command, one in which files are copied into a directory and another in which
  404. a file is copied to another file.
  405.  
  406.    Use <cd> to change to your home directory. Then enter the following command
  407. to copy the contents of [catfile2], created in section 4.5.4, to [catfile3]:
  408.  
  409.                             <cp catfile2 catfile3>
  410.  
  411.    You now have two files with identical contents. To copy [catfile2] and
  412. [catfile3] to the [/tmp] directory, enter the following command:
  413.  
  414.                            <cp catfile2 catfile3 /tmp>
  415.  
  416.    This last command can be simplified by using a wildcard character:
  417.  
  418.                               <cp catfile* /tmp>
  419.  
  420.    Like the <mv> command, <cp> always checks to see if the last argument
  421. is the name of a directory, and, if so, all files designated by filename
  422. arguments are copied into that directory. However, unlike the <mv> command,
  423. <cp> leaves the original file untouched. There should now be two copies of
  424. [catfile2] and [catfile3] on the system, one copy of each in the current
  425. directory and one copy of each in [/tmp].
  426.  
  427.  
  428. _______________________________________________________________________________
  429.  
  430. 4.5.7                            FINDING FILES                            4.5.7
  431. _______________________________________________________________________________
  432.  
  433.    A XENIX filesystem can contain thousands of files. Because of this,
  434. files can often get lost. The <find> command is used to search the file-
  435. system for files. The command has the form:
  436.  
  437.                     <find pathname -name filename -print>
  438.  
  439.    The pathname is the pathname of the directory that you want to search.
  440. The search is recursive; it starts at the directory named and searches
  441. downward through all files and subdirectories under the named directory.
  442.  
  443.    The <-name> option indicates that you are searching for files that have
  444. a specific filename. The <-print> option indicates that you want to print
  445. that pathnames of all the files that match [filename] on your screen.
  446.  
  447.    Enter the following command to search all directories and subdirectories
  448. for [catfile2], the file created in section 4.5.4:
  449.  
  450.                       <find / -name catfile2 -print>
  451.  
  452.    It may take a few minutes for this command to finish executing. The
  453. output of this <find> command should indicate that there are at least two
  454. occurrences of [catfile2], one in [/tmp] and one in your home directory.
  455. Remove [catfile2] and [catfile3] from [/tmp] and from your home directory
  456. by entering the following command:
  457.  
  458.                      <rm /tmp/catfile* $HOME/catfile*>
  459.  
  460.  
  461. _______________________________________________________________________________
  462.  
  463. 4.6                            PROCESSING TEXT FILES                        4.6
  464. _______________________________________________________________________________
  465.  
  466.    XENIX includes a set of utilities that let you process information in
  467. text files. These utilities enable you to compare the contents of two files,
  468. sort files, search for patterns in files, and count the characters, words,
  469. and lines in files. These utilities are described below.
  470.  
  471.  
  472. _______________________________________________________________________________
  473.  
  474. 4.6.1                           COMPARING FILES                           4.6.1
  475. _______________________________________________________________________________
  476.  
  477.    The <diff> command allows you to compare the contents of two files and
  478. to print out those lines that differ between the files. To experiment with
  479. <diff>, use <vi> to create two files to compare. The files will me [men] and
  480. [women]. First <cd> to your home directory. Then enter the following command
  481. at the XENIX prompt:
  482.  
  483.                                    <vi men>
  484.  
  485.    When you are placed in <vi>, press the [i] key to enter Insert Mode, 
  486. and then type the following lines:
  487.  
  488.                       Now is the time for all good men to
  489.                       Come to the aid of their party.
  490.  
  491.    Press ESC to return to Command mode and save [men] by entering [:w].
  492.    While still in Command mode, enter the following command to create
  493.    [women]:
  494.  
  495.                                  <:n women>
  496.  
  497.    You see the following message:
  498.  
  499.                       ---------------------------------
  500.                       "women" No such file or directory
  501.                       ---------------------------------
  502.  
  503.    You are then placed in [women]. Press [i] to enter Insert mode and then
  504. enter the following lines:
  505.  
  506.                      Now is the time for all good women to
  507.                      Come to the aid of their party.
  508.  
  509.    Press ESC to return to Command mode, then [:x] to save [women] and
  510. leave <vi>. You have now created [men] and [women].
  511.  
  512.    Enter the following command to compare the the contents of these two
  513. files:
  514.  
  515.                              <diff men women>
  516.  
  517.    This <diff> command should produce the following output:
  518.  
  519.                    -------------------------------------
  520.                    1c1
  521.                    <Now is the time for all good men to
  522.                    ---
  523.                    >Now is the time for all good women to
  524.                    --------------------------------------
  525.  
  526.    The lines displayed are the lines that differ from one another in the
  527. two files.
  528.                
  529.  
  530. _______________________________________________________________________________
  531.  
  532. 4.6.2                            SORTING FILES                            4.6.2
  533. _______________________________________________________________________________
  534.  
  535.    One of the most useful file processing commands is <sort>. When used
  536. without options, <sort> alphabetizes lines in a file, starting with the
  537. leftmost character of each line. These sorted lines are then output to
  538. the screen, or to a file if redirection is used on the <sort> command
  539. line. This command does not affect the contents of the actual file.
  540.  
  541.    Enter the following command to display an alphabetized list of all
  542. users who have system accounts:
  543.  
  544.                              <sort /etc/passwd>
  545.  
  546.    The <sort> command is useful in pipes. Enter the following command to
  547. display an alphabetized list of users who are currently using the system:
  548.  
  549.                                 <who | sort>
  550.  
  551.  
  552. _______________________________________________________________________________
  553.  
  554. 4.6.3                 SEARCHING FOR PATTERNS IN A FILE                    4.6.3
  555. _______________________________________________________________________________
  556.  
  557.    The <grep> command selects and extracts lines from a file, printing only
  558. those lines that match a given pattern. Enter the following command to print
  559. out the lines in [/etc/passwd] that contain your login information. There
  560. will probably be only one such line:
  561.  
  562.                              <grep login /etc/passwd>
  563.  
  564.    Be sure to replace [login] in this command with your login name. Your
  565. output should be similar to the following:
  566.  
  567.       -----------------------------------------------------------------
  568.       markt:0V/wE/utnUkpc:6005:104:Mark Taub, Docland:/u/markt:/bin/csh
  569.       -----------------------------------------------------------------
  570.  
  571.    Note that whenever wildcard characters are used to specify a <grep>
  572. search pattern, the pattern should be enclosed in single quotation marks
  573. ('). Note also that the search pattern is case sensitive. Searching for
  574. "joe" will not yield lines containing "Joe".
  575.  
  576.    As another example, assume that you have a file named [phonelist]
  577. that contains a name followed by a phone number on each line. Assume also
  578. that there are several thousand lines in this list. You can use <grep>
  579. to find the phone number of someone named Joe, whose phone number prefix
  580. is 822, by entering the following command:
  581.  
  582.             <grep 'Joe' phonelist | grep '822-' > joes.number>
  583.  
  584.    The <grep> utility first finds all occurrences of lines containing the
  585. word "Joe" in the file [phonelist]. The output from this command is then
  586. filtered through another <grep> command, which searches for an "822-"
  587. prefix, thus removing any unwanted "Joes." Finally, assuming that a
  588. unique phone number for Joe exists with the "822-" prefix, that name and
  589. number are placed in a the file [joes.number].
  590.  
  591.    Two other pattern searching utilities are available with XENIX. These
  592. are <egrep> and <fgrep>. Refer to <grep(C)> in the XENIX User's Reference
  593. for more information on these utilities.
  594.  
  595.  
  596. _______________________________________________________________________________
  597.  
  598. 4.6.4                COUNTING WORDS, LINES, AND CHARACTERS                4.6.4
  599. _______________________________________________________________________________
  600.  
  601.    The <wc> utility is used to count words in a file. Words are presumed to
  602. be separated by punctuation, spaces, tabs, or newlines. In addition to
  603. counting words, <wc> counts characters and lines.
  604.  
  605.    Use <cd> to change to your home directory. Then enter the following
  606. command to count the lines, words, and characters in the file [men], created
  607. in section 4.6.1:
  608.  
  609.                                    <wc men>
  610.  
  611.    The output from this command should be the following:
  612.  
  613.                           -------------------------
  614.                           2     16    68 men
  615.                           -------------------------
  616.  
  617.    The first number is the number of lines in [men], the second number is
  618. the number of words and the third number is the number of characters. Remove
  619. [men] and [women] by entering the following command:
  620.  
  621.                                   <rm *men>
  622.  
  623.    To specify a count of characters, words, or lines only, you must use
  624. the <-c>, <-w>, or <-l> option, respectively. For example, enter the following
  625. command to count the number of users currently logged onto the system:
  626.  
  627.                                 <who | wc -l>
  628.  
  629.    The <who> command reports on who is using the system, one user per line.
  630. The <wc -l> command counts the number of lines reported by the <who> command.
  631. This is the number of users currently on the system.
  632.  
  633.  
  634. _______________________________________________________________________________
  635.  
  636. 4.7                   USING FILE AND DIRECTORY PERMISSIONS                  4.7
  637. _______________________________________________________________________________
  638.  
  639.    The XENIX system allows the owner of a file or directory to restrict
  640. access to that file or directory. This is done with permission settings.
  641. Permissions on a file limit who can read, write and/or execute the files.
  642. Permissions on a directory limit who can <cd> to the directory, list the
  643. contents of the directory, and create and delete files in the directory.
  644.  
  645.    To determine the permissions associated with a given file or directory,
  646. use the <l> command. Use <cd> to change to your home directory and then
  647. enter <l> to get a long listing of the files in this directory.
  648.  
  649.    Permissions are indicated by the first 10 characters of the output of
  650. the <l> command. The first character indicates the type of file and must
  651. be one of the following:
  652.  
  653.  
  654.                 -           Indicates an ordinary file.
  655.  
  656.                 b           Indicates a block special device such as a
  657.                             hard or floppy disk. Hard and floppy disks
  658.                             can be treated as both block and character
  659.                             special devices.
  660.  
  661.                 c           Indicates a character special device such as
  662.                             a lineprinter or terminal.
  663.  
  664.                 d           Indicates a directory.
  665.  
  666.                 m           Indicates a shared data file.
  667.  
  668.                 n           Indicates a name special file.
  669.  
  670.                 p           Indicates a named pipe.
  671.  
  672.                 s           Indicates a semaphore.
  673.  
  674.  
  675.    From left to right, the next nine characters are interpreted as three
  676. sets of three permissions. Each set of three indicates the following
  677. permissions:
  678.  
  679.  
  680.                 *    Owner permissions,
  681.  
  682.                 *    Group permissions, and
  683.  
  684.                 *    All other user permissions.
  685.  
  686.  
  687.    Within each set, the three characters indicate permission to read, to
  688. write, and to execute the file as a command, respectively. For a directory,
  689. "execute" permission means permission to search the directory for any files
  690. or directories.
  691.  
  692.    Ordinary file permissions have the following meanings:
  693.  
  694.  
  695.                  r      The file is readable.
  696.  
  697.                  w      The file is writable.
  698.  
  699.                  x      The file is executable.
  700.  
  701.                  -      The permission is not granted.
  702.  
  703.  
  704.    For directories, permissions have the following meanings:
  705.  
  706.  
  707.                  r      Files can be listed in the directory; the directory
  708.                         must also have "x" permission.
  709.  
  710.                  w      Files can be created or deleted in the directory.
  711.                         As with "r", the directory itself must also have
  712.                         "x" permission.
  713.  
  714.                  x      The directory can be searched. A directory must
  715.                         have "x" permission before you can move to it with
  716.                         the <cd> command, access a file within it, or list
  717.                         the files in it. Remember that a user must have "x"
  718.                         permission to do anything useful to the directory.
  719.  
  720.  
  721.    The following are some typical directory permission combinations:
  722.  
  723.  
  724.           d--------     No access at all. This is the mode that denies 
  725.                         access to the directory to all users but the
  726.                         superuser.
  727.  
  728.           drwx-----     Limits access to the owner. The owner can list the
  729.                         contents of this directory and the files in it (if
  730.                         they have appropriate permissions), <cd> to the
  731.                         directory, and add files to, and delete files from,
  732.                         the directory. This is the typical permission for
  733.                         the owner of a directory.
  734.  
  735.           drwxr-x---    In addition to allowing the owner all of the above
  736.                         access permissions, this setting allows group members
  737.                         to list the contents of this directory and files within
  738.                         it and to <cd> to this directory. However, group
  739.                         members cannot create files in, or delete files from,
  740.                         this directory. This is the typical permission an
  741.                         owner gives to others who need access to files in
  742.                         his or her directory.
  743.  
  744.           drwxr-x--x    In addition to allowing the owner and the group all
  745.                         of the above access permissions, this setting allows
  746.                         users other than the owner or members of the group
  747.                         to <cd> to this directory. However, because the <r>
  748.                         is not set for others, other users cannot list the
  749.                         contents of this directory with any of the <ls>
  750.                         commands. This mode is rarely used, but it can be
  751.                         useful if you want to give someone access to a specific
  752.                         file in a directory without revealing the presence of
  753.                         other files in the directory.
  754.  
  755.  
  756.    The [/etc] directory contains files whose permissions vary. Examine the
  757. permissions of the files in this directory by entering the following command:
  758.  
  759.                              <l /etc | more>
  760.  
  761.  
  762. _______________________________________________________________________________
  763.  
  764. 4.7.1                       CHANGING FILE PERMISSIONS                     4.7.1
  765. _______________________________________________________________________________
  766.  
  767.    The <chmod> command changes the read, write, execute, and search permis-
  768. sions of a file or directory. It has the form:
  769.  
  770.                         <chmod instruction filename>
  771.  
  772.    The instruction argument indicates which permissions you want to change
  773. for which class of users. There are three classes of users, and three levels
  774. of permissions. The users are specified as follows:
  775.  
  776.  
  777.        u              User, the owner of the file or directory.
  778.  
  779.        g              Group, the group the owner of the file belongs to.
  780.  
  781.        o              Other, all users of the system who are not in u or g.
  782.  
  783.        a              All users of the system.
  784.  
  785.  
  786.    The permissions are specified as follows:
  787.  
  788.  
  789.        r              Read, which allows permitted users to look at but not
  790.                       change or delete the file.
  791.  
  792.        w              Write, which allows permitted users to change or even
  793.                       delete the file.
  794.  
  795.        x              Execute, which allows permitted users to execute the
  796.                       file as a command.
  797.  
  798.  
  799.    Use <cd> to move to your home directory. Then enter the following command
  800. to create [tempfile]:
  801.  
  802.                              <touch tempfile>
  803.  
  804.    The permissions on [tempfile] are probably:
  805.  
  806.                                 -rw-r--r--
  807.  
  808.    Verify this by entering the following command:
  809.  
  810.                                <l tempfile>
  811.  
  812.    Enter the following command to give yourself (the file's owner) execute
  813. permissions on [tempfile]:
  814.  
  815.                            <chmod u+x tempfile>
  816.  
  817.    Verify the premissions change with the <l> command. (Of course, since
  818. [tempfile] is neither a binary nor a script, having execute permission on
  819. it is meaningless.)
  820.  
  821.    Enter the following command to give the group and other users write
  822. permission on [tempfile]:
  823.  
  824.                             <chmod go+w tempfile>
  825.  
  826.    Verify the permissions change with the <l> command.
  827.  
  828.    The <chmod> command also allows you to remove permissions. For example,
  829. enter the following command to prohibit others from writing to [tempfile]:
  830.  
  831.                              <chmod o-w tempfile>
  832.  
  833.    Remove [tempfile] with the following command:
  834.  
  835.                                 <rm tempfile>
  836.  
  837.  
  838. _______________________________________________________________________________
  839.  
  840. 4.7.2                     CHANGING DIRECTORY PERMISSIONS                  4.7.2
  841. _______________________________________________________________________________
  842.  
  843.    Directories also have an execute permission, even though they cannot be
  844. executed in the same way that a script or binary file can. For directories,
  845. the execute attribute is needed in order to do any useful work in a directory.
  846. Users who do not have execute permission for a directory cannot <cd> to the
  847. directory, list the names of files in the directory, or copy files to or from
  848. the directory.
  849.  
  850.    The permissions on your home directory are probably set to the following:
  851.  
  852.                                   drwxr-xr-x
  853.  
  854.    Verify this by entering the following command:
  855.  
  856.                                  <l -d $HOME>
  857.  
  858.    You probably see output like the following:
  859.  
  860.            --------------------------------------------------------
  861.            drwxr-xr-x  4 markt   pub     240 Feb 10 09:09  /u/markt
  862.            --------------------------------------------------------
  863.  
  864.    This setting allows you, the directory's owner, to <cd> to the directory,
  865. to list the contents of the directory and of the files within it (if the file
  866. permissions also allow), and to create and delete files in the directory. This
  867. setting also allows members of the group and other users to <cd> to the
  868. directory, to list the directory's contents and also the contents of files
  869. within the directory, if file permissions allow.
  870.  
  871.    To deny any useful access to others, enter the following command:
  872.  
  873.                                <chmod o-x $HOME>
  874.  
  875.    Verify that the permissions were changed with the following command:
  876.  
  877.                                   <l -d $HOME>
  878.  
  879.    Your output should look like the following:
  880.  
  881.            --------------------------------------------------------
  882.            drwxr-xr--  4 markt   pub     240 Feb 10 09:09  /u/markt
  883.            --------------------------------------------------------
  884.  
  885.    Now, only you and the members of the group have access to your directory.
  886. If you want to restore access to your home directory to other users, enter the
  887. following command:
  888.  
  889.                                 <chmod o+x $HOME>
  890.  
  891.  
  892. _______________________________________________________________________________
  893.  
  894.  4. RECOMMENDED
  895.  --------------
  896.  This section is included in every issue of The European Digest and will
  897.  contain recommended stuff/boards/reading and so on. For this file,
  898.  some currently popular drinks;
  899.  
  900.  
  901.         B-52                   ----------  1/3 Kahlua
  902.                                            1/3 Bailey's
  903.                                            1/3 Grand Marnier
  904.  
  905.         Burning B-52           ----------  (set the above on fire)
  906.  
  907.         Brain                  ----------  1/2 Bailey's
  908.                                            1/2 Shnapps
  909.                                            (in a shot-glass)
  910.  
  911.         Orgasm                 ----------  1 1/2 oz Vodka
  912.                                            1 1/2 oz Triple sec
  913.                                            Splash of Rose's Lime Juice
  914.                                            Fill up with Soda Water,
  915.                                            7-Up or Sprite
  916.  
  917.         Screaming Orgasm       ----------  Pour as much Galliano as
  918.                                            possible in a spoon, and
  919.                                            add to the above.
  920.  
  921.         Woo-Woo                ----------  Ice
  922.                                            2 oz Vodka
  923.                                            1 oz Peachshnapps
  924.                                            Fill up with Cranberry Juice
  925.  
  926.  
  927.  5. END COMMENTS
  928.  ---------------
  929.  The European Digest will NOT cover european news. We have started a new
  930.  series in Swedish, with such news, which will be released on the last day
  931.  every month. So, we'll stick to this format.
  932.  
  933.  The European Digest will not feature Hacking techniques, Phreaking, Carding,
  934.  information about government systems or the basic underground rap. It will 
  935.  be different. It IS different. Manuals, The Underground Scene, Deep Deep
  936.  whatever, and so on. Less 'general rag stuff' and More Miscellaneous stuff.
  937.  Swedish Hacker News will be presented through the 'uXu - Swedish News' series,
  938.  but ONLY in Swedish. English translations will however be published in future
  939.  issues of the well-known underground rag, Phrack Inc.
  940.  
  941.  Check out the Next TED for another issue! (no kiddin'?)
  942.  
  943.  You can reach me on the following boards for comments, contributions,
  944.  questions or whatever:
  945.  
  946.  Ripco ][                 [312-528-5020]
  947.  Condemned Reality        [618-397-7702]
  948.  Demon Roach Underground  [806-794-4362]
  949.  Solsbury Hill            [301-428-3268]
  950.  Anonymous                [+45-981-89771]
  951.  The Stash                [+46-498-22113]
  952.  Sedes Diaboli            [+46-586-43766]
  953.  
  954.  You can't reach me on the following boards anymore. Reason(s) stated below.
  955.  
  956.  Balanced pH              [818] Down
  957.  Land Of Karrus           [215] Down
  958.  Lunatic Labs             [213] (ok, Sometimes)
  959.  
  960.  The Chief 1992
  961.  
  962.  %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&
  963.  %                                                                          %
  964.  &  "Congress shall make no law respecting an establishment of religion, or &
  965.  %  prohibitting the free excercise thereof; or abbridging the freedom of   %
  966.  &  speech or of the press; or of the right of the people peaceably to      &
  967.  %  assemble, and to petition the Goverment for a redress of grievances."   %
  968.  &                                                                          &
  969.  %  This work is released according to the above Constitutional rights      %
  970.  &  for INFORMATIONAL PURPOSES ONLY.                                        &
  971.  %                                                                          %
  972.  &%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%
  973.  
  974.  ____________________________________________________________________________
  975.  ____________________________________________________________________________
  976.  
  977. Downloaded From P-80 International Information Systems 304-744-2253 12yrs+
  978.